package com.fzy.core.tags;

import java.io.IOException;

import javax.servlet.jsp.JspException;
import javax.servlet.jsp.tagext.BodyContent;
import javax.servlet.jsp.tagext.BodyTagSupport;

public class ExtGridHeadRowTag extends BodyTagSupport {

	private static final long serialVersionUID = -1189487321178403812L;
	
	public int doStartTag() throws JspException {
		String html = "";
		html += "				<tr>";
//		html += "					<td>";
//		html += "						<div";
//		html += "							style=\"border-width: 1px; width: 40px; height: auto; position: relative !important;\"";
//		html += "							class=\"x-unselectable x-row-numberer x-column-header-align-right x-box-item x-column-header x-unselectable-default x-column-header-first\">";
//		html += "							<div class=\"x-column-header-inner\"";
//		html += "								style=\"height: auto; padding-top: 3px;\">";
//		html += "								<span class=\"x-column-header-text\">序号</span>";
//		html += "							</div>";
//		html += "							<div class=\"x-clear\"></div>";
//		html += "						</div>";
//		html += "					</td>";
		try {
			pageContext.getOut().print(html);
		} catch (IOException e) {
			e.printStackTrace();
		}
		return super.doStartTag();
	}

	public void doInitBody() throws JspException {
		super.doInitBody();
	}

	public int doAfterBody() throws JspException {
		BodyContent bodycontent = getBodyContent();
		String html = bodycontent.getString();
		try {
			bodycontent.getEnclosingWriter().print(html);
		} catch (IOException e) {
			e.printStackTrace();
		}
		return super.doAfterBody();
	}

	public int doEndTag() throws JspException {
		String html = "";
		html += "				</tr>";
		try {
			pageContext.getOut().print(html);
		} catch (IOException e) {
			e.printStackTrace();
		}
		return super.doEndTag();
	}

}
